@echo off
setlocal enabledelayedexpansion

REM 替换所有Java文件中的portstorage包引用
for /r "src" %%i in (*.java) do (
    echo 处理文件: %%i
    
    set "content="
    for /f "tokens=*" %%j in (%%i) do (
        set "line=%%j"
        set "line=!line:import com.example.port.portstorage.=import com.example.port.entity.!"
        set "content=!content!!line!
"
    )
    
    echo !content! > "%%i"
)

echo 替换完成! 